<?php
	echo stylesheet_tag(
		'/FoxsisLibPlugin/js/dataTable/css/demo_page.css',
		'/FoxsisLibPlugin/js/dataTable/css/demo_table_jui.css'
	);
?>

<table class="list" id="dataTable">
	<thead>
		<tr>
			<?php foreach($colunas as $name	=> $col): ?>
				<th><?php echo $name; ?></th>
			<?php endforeach; ?>
		</tr>

	</thead>
	<tbody>
		<tr>
			<td colspan="<?php echo count($colunas);?>" class="dataTables_empty">Verificando dados...</td>
		</tr>
	</tbody>
</table>

<?php
	echo javascript_include_tag(
		'/FoxsisLibPlugin/js/dataTable/js/jquery.dataTables.min.js',
		'/FoxsisLibPlugin/js/dataTable/js/jquery.dataTables.refresh.js'
	);
?>

<script type="text/javascript">
	$(document).ready(function(){
		System.griddata.dataTable(
			'<?php echo url_for($sf_context->getModuleName().'/'.$url_grid.'?columns='.$col_names); ?>',
			<?php echo $aoColumns; ?>, 
			'<?php echo (__FILE__); ?>'
		);
	});
</script>